
let arr = [10,20,30]
let a = arr[0]
let b = arr[1]
let c = arr[2]
console.log(a,b,c)
// ES6允许按照一定模式，从数组和对象中提取值，对变量进行赋值，这被称为解构
// var [a, b, c] = [1, 2, 3];

// 解构赋值
let arry = ['dfs','sfdf']
let [zhao,liu] = arry
// 对象
let obj ={
    name:"小",
    xiaping :function () {
        console.log("解构了")
    }
}
let {name,xiao} = obj;
// 可以直接出现换行符
let myst = `我是字符串${name}`;
console.log(myst)


